package com.java.gui;
import java.awt.FlowLayout;

import javax.swing.JButton;
import javax.swing.JFrame;
public class FlowLayoutTest {
	public static void main(String[] args) {
		JFrame jf=new JFrame("流动布局");
		jf.setLayout(new FlowLayout());
		for(int i=0;i<10;i++){
			jf.add(new JButton("Button_"+i));
			
		}
		jf.setSize(400, 300);
		jf.setVisible(true);
		jf.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
	}

}
